//
//  UILabel+Categotry.m
//  TLUIKit
//
//  Created by c on 2021/10/27.
//

#import "UILabel+Categotry.h"
#import <objc/runtime.h>

@implementation UILabel (Categotry)

+ (instancetype)lableWithFrame:(CGRect)rect font:(UIFont *)font textColor:(UIColor *)textColor {
    UILabel *label = [[UILabel alloc]initWithFrame:rect];
    label.font = font;
    label.textColor = textColor;
    return label;
}

+ (instancetype)lableWithFrame:(CGRect)rect size:(CGFloat)size textColor:(UIColor *)textColor {
    UILabel *label = [[UILabel alloc]initWithFrame:rect];
    label.font = [UIFont systemFontOfSize:size];
    label.textColor = textColor;
    return label;
}

+ (instancetype)lableWithFrame:(CGRect)rect size:(CGFloat)size weight:(UIFontWeight)weight textColor:(UIColor *)textColor text:(NSString *)text {
    UILabel *label = [[UILabel alloc]initWithFrame:rect];
    label.font = [UIFont systemFontOfSize:size weight:weight];
    label.textColor = textColor;
    label.text = text;
    return label;
}

+ (instancetype)lableWithFrame:(CGRect)rect boldSize:(CGFloat)size textColor:(UIColor *)textColor {
    UILabel *label = [[UILabel alloc]initWithFrame:rect];
    label.font = [UIFont systemFontOfSize:size weight:UIFontWeightBold];
    label.textColor = textColor;
    return label;
}

@end
